#include<iostream>
#include<algorithm>
#include<cmath>

using namespace std;

const int N = 1010;

int n;
double d;

struct node
{
    double l , r;
}a[N];

bool cmp(node &x , node &y)
{
    return x.l < y.l;
}

int main()
{
    int cnt = 0;
    bool flag = false; //判断是否成立
    while(cin >> n >> d , n && d)
    {
        for(int i = 1;i <= n;i ++)
        {
            double x , y; cin >> x >> y;
            if(y > d) flag = true;
            double l = sqrt(d * d - y * y);
            a[i].l = x - l , a[i].r = x + l;
        }

        cout << "Case " << cnt << ": ";
        if(flag) cout << -1 << endl;
        else
        {
            sort(a + 1 , a + 1 + n , cmp);
            int ret = 1;
            double r = a[1].r;
            for(int i = 2;i <= n;i ++)
            {
                double left = a[i].l , right = a[i].r;
                if(left <= r)
                {
                    r = min(r , right);
                }
                else
                {
                    ret ++;
                    r = right;
                }
            }
            cout << ret << endl;
        }
    }
    return 0;
}